package random.fox.p2p.model;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import random.fox.p2p.AppModule;
import random.fox.p2p.interactors.MessageInteractor;
import random.fox.p2p.presenter.ReplyPresenter;
import random.fox.p2p.presenter.ReplyPresenterImpl;
import random.fox.p2p.ui.ReplyView;
import random.fox.p2p.view.IReplyVierw;

/**
 * Created by acer on 2015/4/6.
 */

@Module(
        injects = {
                ReplyView.class,
        },
        addsTo = AppModule.class
)
public class ReplyModule {

    private IReplyVierw iReplyVierw;

    public ReplyModule(IReplyVierw iReplyVierw){
        this.iReplyVierw = iReplyVierw;
    }

    @Provides
    @Singleton
    public IReplyVierw providerIReplyVierw(){
        return this.iReplyVierw;
    }

    @Provides
    @Singleton
    public ReplyPresenter providerReplyPresenter(IReplyVierw iReplyVierw , MessageInteractor interactor){
        return new ReplyPresenterImpl(iReplyVierw ,interactor);
    }
}
